import pandas as pd
import xlsxwriter

df1 = pd.read_excel(
    r"C:\Users\liutong\Documents\Tencent Files\707921012\FileRecv\玉溪人民医院专业病理系统\玉溪人民医院专业病理系统\病理调研内容\病理科特检标记物清单.xlsx",
    sheet_name='Sheet1')
df2 = pd.DataFrame(df1[0:0])
list0 = list(df2.columns)
print(list0)
print(list0.index('Unnamed: 1'))
list2 = list0[0:1]

string1 = ''.join(list2).strip('\n')

list3 = string1.split('、')
list4 = '\n'.join(list3).replace(' ', '').split('\n')

while "" in list4:
    list4.remove("")
workbook = xlsxwriter.Workbook("ces.xlsx")
worksheet = workbook.add_worksheet('sheet1')
k = 1
for n in list4:
    if ':' in n:
        n = n[2: -1]
    worksheet.write(k, 0, n)
    k += 1
workbook.close()
